# Makefile for hello
# Author: Li wenxiang <lwx169@gmail.com>
# Create Date: 23 Apr 2014

PACKAGE = hello-0.1
OBJS = hello.o
CFLAGS = -Wall
CP = cp -f
RM = rm -f
TAR = tar -zcf

exe: hello
tarball: hello.tar.gz
all: hello hello.tar.gz

hello: $(OBJS)
	$(CC) $^ -o $@

%.o: %.c %.h

hello.tar.gz:
	mkdir ./$(PACKAGE)
	$(CP) *.c Makefile $(PACKAGE)
	$(TAR) $@ $(PACKAGE)
	$(RM) -r $(PACKAGE)

.PHONY: clean
clean:
	$(RM) $(OBJS) hello hello.tar.gz

